import fetch from '@/config/fetch'

/**
 * 登陆
 */

export const login = data => fetch('/sys/user/login', data);

export const upload = '/sys/file/upload';
//标签操作
export const metaSave = data => fetch('/sys/meta/save', data, 'POST');
export const metaList = data => fetch('/sys/meta/list', data);
export const metaRemove = data => fetch('/sys/meta/remove', data);
export const metaUpdate = data => fetch('/sys/meta/update', data, 'POST');

//菜单
export const menuSave = data => fetch('/sys/menu/save', data, 'POST');
export const menuList = data => fetch('/sys/menu/list', data);
export const menuDelete = data => fetch('/sys/menu/remove', data);
export const menuUpdate = data => fetch('/sys/menu/update', data, 'POST');
//角色
export const roleSave = data => fetch('/sys/role/save', data, 'POST');
export const roleList = data => fetch('/sys/role/list', data);
export const roleDelete = data => fetch('/sys/role/remove', data);
export const roleInfo = data => fetch('/sys/role/edit', data);
export const roleUpdate = data => fetch('/sys/role/update', data, 'POST');
//用户
export const userSave = data => fetch('/sys/user/save', data, 'POST');
export const userList = data => fetch('/sys/user/list', data);
export const userDelete = data => fetch('/sys/user/remove', data);
export const userUpdate = data => fetch('/sys/user/update', data, 'POST');

//商户
export const customerSave = data => fetch('/sys/customer/save', data, 'POST');
export const customerList = data => fetch('/sys/customer/list', data);
export const customerDelete = data => fetch('/sys/customer/remove', data);
export const customerUpdate = data => fetch('/sys/customer/update', data, 'POST');
export const customerInfo = data => fetch('/sys/customer/edit', data);
export const customerAudit = data => fetch('/sys/customer/audit', data, 'POST');

//客户
export const parentsList = data => fetch('/sys/parents/list', data);
export const parentsDelete = data => fetch('/sys/parents/remove', data);
export const parentsInfo = data => fetch('/sys/parents/edit', data);

//课程
export const courseSave = data => fetch('/sys/course/save', data, 'POST');
export const courseList = data => fetch('/sys/course/list', data);
export const courseDelete = data => fetch('/sys/course/remove', data);
export const courseUpdate = data => fetch('/sys/course/update', data, 'POST');
export const courseInfo = data => fetch('/sys/course/edit', data);
export const updateStatus = data => fetch('/sys/course/updateStatus', data, 'POST');

//红包
export const redBagConfigSave = data => fetch('/sys/redBagConfig/save', data, 'POST');
export const redBagConfigUpdate = data => fetch('/sys/redBagConfig/update', data, 'POST');
export const getRedBagConfig = data => fetch('/sys/redBagConfig/getConfig', data);

//宝宝
export const getBabyList = data => fetch('/sys/baby/list', data);

//查询订单
export const listByTime = data => fetch('/sys/order/listByTime', data);
